package com.ibm.moa.outmail;

import android.app.Application;
import android.os.Environment;

import com.ibm.moa.outmail.module.MailProvider.Providers.Provider;
import com.ibm.moa.outmail.utils.CrashHandler;
import com.ibm.moa.outmail.utils.MailUtils;
import com.ibm.moa.outmail.utils.SDUtils;

public class MailApplication extends Application {
	public static MailApplication instance;
	public static String userCode = "";
	public static String passWord = "";
	public static String fileSaveDir = Environment.getExternalStorageDirectory().toString() + "/moa/mail";

	public static final String from = "outmail";
	public static Provider provider;

	@Override
	public void onCreate() {
		super.onCreate();
		instance = this;
		// 收集错误日志
		CrashHandler crashHandler = CrashHandler.getInstance();
		crashHandler.init(getApplicationContext());
		MailUtils.init(getApplicationContext());
		String stPaht = SDUtils.getStorePath(this);
		fileSaveDir = stPaht + "/moa/mail";
	}

	public static MailApplication getInstance() {
		return instance;
	}
}
